#include <iostream>

using namespace std;

auto rm(float w, float(*g)(float), size_t n)->float
{
	cout << w << endl;
	for (size_t k = 0; k < n; ++k)
	{
		w = w - g(w) / (k + 1);
		cout << w << endl;

	}

	return w;
}

float g(float x) { return x * x * x; }

int main()
{
	rm(0.9, g, 20);
	return 0;
}